﻿using System;
using System.Collections.Generic;
using System.Text;
using Twitterizer.Framework;

namespace TwitterApp
{
    namespace BusinessLogic
    {
        public class StatusCollection : List<Status>
        {
            private Twitter twitter;

            public StatusCollection(Twitter pTwitter)
            {
                twitter = pTwitter;
            }

            public void LoadFriendsTimeLine()
            {
                try
                {
                    TwitterStatusCollection twitterstatuscollection = twitter.Status.FriendsTimeline();
                    foreach (TwitterStatus twitterstatus in twitterstatuscollection)
                    {
                        Status status = new Status();
                        status.Load(twitterstatus);
                        this.Add(status);
                    }
                }
                catch(Exception exception)
                {

                }
            }
        }
    }
}